﻿<TestCase testName="Test_19_SetContextBeforeTest">

	<TestSetup>
	</TestSetup>

	<TestExecution>
		<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileCreateStep">
			<SourcePath takeFromCtx="SrcPath"></SourcePath>
			<CreationPath takeFromCtx="DstPath"></CreationPath>
		</TestStep>

		<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileCreateStep">
			<SourcePath>..\..\..\TestData\InDoc1.xml</SourcePath>
			<CreationPath>..\..\..\Rec_03\TransactionId_%Guid%.xml</CreationPath>
		</TestStep>

		<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileCreateStep">
			<SourcePath>..\..\..\TestData\InDoc1.xml</SourcePath>
			<CreationPath>..\..\..\Rec_03\TransactionId_%Guid%.xml</CreationPath>
		</TestStep>

		<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileValidateStep">
			<Timeout>3000</Timeout>
			<Directory>..\..\..\Rec_03\</Directory>
			<SearchPattern>TransactionId_*.xml</SearchPattern>
			<DeleteFile>true</DeleteFile>

			<ValidationStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.XmlValidationStep">
				<XmlSchemaPath>..\..\..\TestData\PurchaseOrder.xsd</XmlSchemaPath>
				<XmlSchemaNameSpace>http://SendMail.PurchaseOrder</XmlSchemaNameSpace>
				<XPathList>
					<XPathValidation query="/*[local-name()='PurchaseOrder' and namespace-uri()='http://SendMail.PurchaseOrder']/*[local-name()='PONumber' and namespace-uri()='']">PONumber_0</XPathValidation>
				</XPathList>
			</ValidationStep>
		</TestStep>

	</TestExecution>

	<!-- Test cleanup: test cases should always leave the system in the state they found it -->
	<TestCleanup>
		<TestStep assemblyPath="" typeName="Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileDeleteStep">
			<FileToDeletePath>..\..\..\Rec_03\InDoc1.xml</FileToDeletePath>
			<FileToDeletePath>..\..\..\Rec_03\InDoc2.xml</FileToDeletePath>
		</TestStep>
	</TestCleanup>

</TestCase>